{extend name="base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/mmgrid/mmGrid.css?v={$v}" />
{/block}
{block name="js"}
<script src="__STATIC__/plugins/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
<script src="__ADMIN__/settlements/shopsettlements.js?v={$v}" type="text/javascript"></script>
{/block}
{block name="main"}
<div class="layui-tab layui-tab-brief" lay-filter="msgTab">
  <ul class="layui-tab-title">
    <li class="layui-this">结算详情</li>
    <li >结算商品列表</li>
  </ul>
  <div class="layui-tab-content" >
    <div class="layui-tab-item layui-show"> 
      <form autocomplete='off'>
      <input type='hidden' id='settlementId' class='ipt' value="{$object['settlementId']}"/>
       <table class='wst-form wst-box-top'>
       
        <tr>
           <td colspan='2' class='head-ititle'>结算信息</td>
        </tr>
        <tr>
           <th>店铺：</th>
           <td>{$object['shopName']}</td>
        </tr>
        <tr>
           <th width='150'>申请单号：</th>
           <td>
           {$object['settlementNo']}
           </td>
        </tr>
        <tr>
           <th>结算金额：</th>
           <td>¥{$object['settlementMoney']}</td>
        </tr>
        <tr>
           <th>结算佣金：</th>
           <td>¥{$object['commissionFee']}</td>
        </tr>
        <tr>
           <th>返还金额：</th>
           <td>¥{$object['backMoney']}</td>
        </tr>
        <tr>
           <th>申请时间：</th>
           <td>{$object['createTime']}</td>
        </tr>
        <tr>
           <td align='center' colspan='2'>
             <div class='mmGrid'>
             <table class='mmg-head wst-grid-tree' width="100%" cellspacing="0" cellpadding="0">
              <thead class='mmg-headWrapper'>
                <tr height='28' class='mmg-head wst-grid-tree-hd'>
                  <th class='wst-grid-tree-hd-cell' style='width:35px;text-align:center;font-weight:bold;'>#</th>
                  <th class='wst-grid-tree-hd-cell' style='text-align:left;font-weight:bold;'>订单号</th>
                  <th class='wst-grid-tree-hd-cell' style='text-align:left;font-weight:bold;'>支付方式</th>
                  <th class='wst-grid-tree-hd-cell' style='text-align:left;font-weight:bold;'>商品金额</th>
                  <th class='wst-grid-tree-hd-cell' style='text-align:left;font-weight:bold;'>运费</th>
                  <th class='wst-grid-tree-hd-cell' style='text-align:left;font-weight:bold;'>订单总金额</th>
                  <th class='wst-grid-tree-hd-cell' style='text-align:left;font-weight:bold;'>积分抵扣</th>
                  <th class='wst-grid-tree-hd-cell' style='text-align:left;font-weight:bold;'>实付金额</th>
                  <th class='wst-grid-tree-hd-cell' style='text-align:left;font-weight:bold;'>佣金</th>
                  <th class='wst-grid-tree-hd-cell' style='text-align:left;font-weight:bold;'>下单时间</th>
                </tr>
              </thead>
                {volist name='$object["list"]' id='vo'}
                <tr class='mmg-body wst-grid-tree-row' height='28' {if $vo['payType']==0}style='background:#eeeeee;'{/if}>
                   <td class='wst-grid-tree-row-cell' align="center">{$key+1}</td>
                   <td class='wst-grid-tree-row-cell'>{$vo['orderNo']}</td>
                   <td class='wst-grid-tree-row-cell'>{:WSTLangPayType($vo['payType'])}</td>
                   <td class='wst-grid-tree-row-cell'>¥{$vo['goodsMoney']}</td>
                   <td class='wst-grid-tree-row-cell'>¥{$vo['deliverMoney']}</td>
                   <td class='wst-grid-tree-row-cell'>¥{$vo['totalMoney']}</td>
                   <td class='wst-grid-tree-row-cell'>¥{$vo['scoreMoney']}</td>
                   <td class='wst-grid-tree-row-cell'>¥{$vo['realTotalMoney']}</td>
                   <td class='wst-grid-tree-row-cell' style='background:#ffffff;'>¥{$vo['commissionFee']}</td>
                   <td class='wst-grid-tree-row-cell'>{$vo['createTime']}</td>
                </tr>
                {/volist}
             </table>
             </div>
           </td>
        </tr>
        <tr >
           <th valign='top'>结算备注：<br/>(店铺可见)&nbsp;&nbsp;</th>
           <td>
             <textarea id='remarks' class='ipt' style='width:70%;height:80px;'></textarea>
           </td>
        </tr>
        <tr>
           <td colspan='2' align='center'>
           	<button type='button' class="btn btn-primary" onclick='javascript:save({$p})'><i class="fa fa-check-circle"></i>提交</button>
           	<button type='button' class="btn"  onclick="javascript:location.href='{:Url(\'admin/settlements/index\',\'p=\'.$p)}'"><i class="fa fa-check-circle"></i>返回</button>
           </td>
        </tr>
      </table>
      </form>
  </div>
  <div class="layui-tab-item">
     <table id="mmg" class="mmg">
         <tr>
            <th rowspan="" colspan=""></th>
         </tr>
     </table>
     <div id="pg" style="text-align: right;"></div>
  </div>
</div>
</div>
<script>
$(function(){
   intView('{$object["settlementId"]}');
})
</script>
{/block}